403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.89
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/LibreOffice/help/en-US/text/sbasic/shared/03030100.html
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Converting Date Values</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for chosen module" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<a name="datevalues"></a>
<h1 id="hd_id3147573" dir="auto">Converting Date Values</h1>
<p id="par_id3154760" class="paragraph" dir="auto">The following functions convert date values to calculable numbers and back.</p>

<div class="embedded">
<a name="dateserial"></a>

<h2 id="hd_id381619878817271" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030101.html">DateSerial Function</a></h2>
<p id="par_id3143267" class="paragraph" dir="auto">Returns a <span class="emph">Date</span> value for a specified year, month, and day.</p>
</div>
<div class="embedded">
<a name="datevalue"></a>
  
  <h2 id="hd_id3156344" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030102.html">DateValue Function</a></h2>
  <p id="par_id3150542" class="paragraph" dir="auto">Returns a <span class="emph">Date</span> object from a string representing a date.</p>
  <p id="par_id671643046319326" class="paragraph" dir="auto">The returned object is represented internally as a single numeric value corresponding to the specified date. This value can be used to calculate the number of days between two dates.</p>
</div>
<div class="embedded">
<a name="day"></a>

<h2 id="hd_id3153345" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030103.html">Day Function</a></h2>
<p id="par_id3147560" class="paragraph" dir="auto">Returns a value that represents the day of the month based on a serial date number generated by <span class="emph">DateSerial</span> or <span class="emph">DateValue</span>.</p>
</div>
<div class="embedded">
<a name="month"></a>

<h2 id="hd_id3153127" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030104.html">Month Function</a></h2>
<p id="par_id3148550" class="paragraph" dir="auto">Returns the month of a year from a serial date that is generated by the DateSerial or the DateValue function.</p>
</div>
<div class="embedded">
<a name="weekday"></a>


<h2 id="hd_id3153127" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030105.html">WeekDay Function</a></h2>
<p id="par_id3146795" class="paragraph" dir="auto">This function returns the number corresponding to the weekday represented by a serial date number that is generated by the <span class="literal">DateSerial</span> or the <span class="literal">DateValue</span> functions.</p>
</div>
<div class="embedded">
<a name="year"></a>

<h2 id="hd_id3148664" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030106.html">Year Function</a></h2>
<p id="par_id3149655" class="paragraph" dir="auto">Returns the year from a serial date number that is generated by the DateSerial or the DateValue function.</p>
</div>
<div class="embedded">
<a name="cdatetoiso"></a>


<h2 id="hd_id3150620" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030107.html">CDateToIso Function</a></h2>
<p id="par_id3151097" class="paragraph" dir="auto">Returns the date in ISO format without separators (YYYYMMDD) from a serial date number that is generated by the DateSerial or the DateValue or the CDateFromIso function.</p>
<p id="par_id3151098" class="paragraph" dir="auto">The year part consists of at least four digits, with leading zeros if the absolute value is less than 1000, it can be negative with a leading minus sign if the date passed denotes a year before the common era (BCE) and it can have more than four digits if the absolute value is greater than 9999. The formatted string returned can be in the range "-327680101" to "327671231".</p>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="Note Icon 
" style="width:40px;height:40px;"></div>
<div class="notetext"><p dir="auto">Years less than 100 and greater than 9999 are supported since LibreOffice 5.4.</p></div>
</div>
<br>
</div>
<div class="embedded">
<a name="cdatefromiso"></a>

<h2 id="hd_id3153127" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030108.html">CDateFromIso Function</a></h2>
<p id="par_id3148550" class="paragraph" dir="auto">Returns the internal date number from a string that contains a date in ISO format (YYYYMMDD or YYYY-MM-DD).</p>
<p id="par_id3148551" class="paragraph" dir="auto">The year part must consist of either two (supported only in YYMMDD format without separators for compatibility) or at least four digits. With four digits leading zeros must be given if the absolute value is less than 1000, it can be negative with a leading minus sign if the date passed denotes a year before the common era (BCE) and it can have more than four digits if the absolute value is greater than 9999. The formatted string can be in the range "-327680101" to "327671231", or "-32768-01-01" to "32767-12-31".</p>
<p id="par_id3148552" class="paragraph" dir="auto">An invalid date results in an error. Year 0 is not accepted, the last day BCE is -0001-12-31 and the next day CE is 0001-01-01. Dates before 1582-10-15 are in the proleptic Gregorian calendar.</p>
<div class="tip">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/tip.svg" alt="Tip Icon 
" style="width:40px;height:40px;"></div>
<div class="notetext"><p dir="auto">When converting a date serial number to a printable string, for example for the Print or MsgBox command, the locale's default calendar is used and at that 1582-10-15 cutover date may switch to the Julian calendar, which can result in a different date being displayed than expected. Use the <a target="_top" href="en-US/text/sbasic/shared/03030107.html">CDateToIso Function</a> to convert such date number to a string representation in the proleptic Gregorian calendar.</p></div>
</div>
<br>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="Note Icon 
" style="width:40px;height:40px;"></div>
<div class="notetext"><p dir="auto">The YYYY-MM-DD format with separators is supported since LibreOffice 5.3.4. Years less than 100 or greater than 9999 are accepted since LibreOffice 5.4 if not in VBA compatibility mode.</p></div>
</div>
<br>
</div>
<div class="embedded">
<a name="cdatetounodate"></a>



<h2 id="hd_id3150620" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030111.html">CDateToUnoDate Function</a></h2>
<p id="par_id3151097" class="paragraph" dir="auto">Returns the date as a UNO com.sun.star.util.Date struct.</p>
</div>
<div class="embedded">
<a name="cdatefromunodate"></a>



<h2 id="hd_id3150620" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030112.html">CDateFromUnoDate Function</a></h2>
<p id="par_id3151097" class="paragraph" dir="auto">Converts a UNO com.sun.star.util.Date struct to a Date value.</p>
</div>
<div class="embedded">
<a name="cdatetounodatetime"></a>



<h2 id="hd_id3150620" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030115.html">CDateToUnoDateTime Function</a></h2>
<p id="par_id3151097" class="paragraph" dir="auto">Returns the time part of the date as a UNO com.sun.star.util.DateTime struct.</p>
</div>
<div class="embedded">
<a name="cdatefromunodatetime"></a>



<h2 id="hd_id3150620" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030116.html">CDateFromUnoDateTime Function</a></h2>
<p id="par_id3151097" class="paragraph" dir="auto">Converts a UNO com.sun.star.util.DateTime struct to a Date value.</p>
</div>
<div class="embedded">
<a name="dateadd"></a>



<h2 id="par_idN10548" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030110.html">DateAdd Function</a></h2>
<p id="par_idN10558" class="paragraph" dir="auto">Adds a date or time interval to a given date a number of times and returns the resulting date.</p>
</div>
<div class="embedded">
<a name="datediff"></a>


<h2 id="par_idN10542" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030120.html">DateDiff Function</a></h2>
<p id="par_idN10546" class="paragraph" dir="auto">Returns the number of date or time intervals between two given date values.</p>
</div>
<div class="embedded">
<a name="datepart"></a>


<h2 id="par_idN10542" dir="auto"><a target="_top" href="en-US/text/sbasic/shared/03030130.html">DatePart Function</a></h2>
<p id="par_idN10546" class="paragraph" dir="auto">The DatePart function returns a specified part of a date.</p>
</div>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sbasic/shared/03030100.xhp" target="_blank">/text/sbasic/shared/03030100.xhp</a></p>
<p dir="auto">Title is: Converting Date Values</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit